package o;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import com.huawei.appgallery.downloadengine.api.SessionDownloadTask;
import com.huawei.appmarket.service.webview.base.jssdk.control.FullAppStatus;

public final class dvq {
    public static String ˊ() {
        return ccv.ˋ();
    }

    public static String ˏ() {
        return ccv.ˊ();
    }

    public static String ˎ() {
        return ContentManager.getInstant().getContext().getPackageName() + ".service.downloadservice.permission.Receiver";
    }

    public static String ॱ() {
        return ContentManager.getInstant().getContext().getPackageName() + ".permission.downloadmanager";
    }

    public static void ˎ(Context context, SessionDownloadTask sessionDownloadTask) {
        ˊ(context, sessionDownloadTask, sessionDownloadTask.ˈ());
    }

    public static void ˊ(Context context, SessionDownloadTask sessionDownloadTask, int i) {
        if (context != null) {
            Intent intent = new Intent();
            String ˊ = ˊ();
            if (sessionDownloadTask != null) {
                if (dvt.ˏ().ˊ(sessionDownloadTask)) {
                    Bundle bundle = new Bundle();
                    Bundle bundle2 = new Bundle();
                    sessionDownloadTask.ˏ(bundle2);
                    bundle.putBundle("downloadtask.all", bundle2);
                    bundle.putInt("downloadtask.status", i);
                    intent.putExtras(bundle);
                    if (i == 2) {
                        ˊ = ˏ();
                    }
                    FullAppStatus fullAppStatus = new FullAppStatus();
                    fullAppStatus.ˊ(sessionDownloadTask.ˊˊ());
                    fullAppStatus.ˏ(i);
                    fullAppStatus.ˊ(sessionDownloadTask.ʼॱ());
                    fullAppStatus.appType_ = 2;
                    fullAppStatus.callerPkg_ = sessionDownloadTask.ॱˎ("callerPkg");
                    fullAppStatus.contentId_ = sessionDownloadTask.ॱˎ("contentId");
                    fullAppStatus.mediaPkg_ = sessionDownloadTask.ॱˎ("mediaPkg");
                    fullAppStatus.extendDownloadFlags_ = sessionDownloadTask.ॱˎ("downloadFlags");
                    enf.ˋ().ˊ(fullAppStatus);
                    if ("4026631".equals(epr.ˎ().ˏ()) && sessionDownloadTask.ॱ() == 17 && i >= 0 && i <= 8 && i != 2) {
                        ejz.ˏ(context, "com.huawei.appmarket.child", i, sessionDownloadTask.ˊˊ());
                    }
                } else {
                    return;
                }
            }
            intent.setAction(ˊ);
            context.sendBroadcast(intent, ॱ());
        }
    }
}
